package d1211.r211.num16;

import java.util.Scanner;

public class c3 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("输入五个数");
        double num1= sc.nextDouble();
        double num2= sc.nextDouble();
        double num3= sc.nextDouble();
        double num4= sc.nextDouble();
        double num5= sc.nextDouble();
        double arr[]=new double []{num1,num2,num3,num4,num5};
        getMax(arr);
        System.out.println("最大值"+getMax(arr));


    }
    public static double getMax( double arr[]){

        double max=arr[0];
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]>max){
                max=arr[i];
            }

        }
        return  max;



    }
}

